#ifndef __CLI_PARSE__ACTOR_H__
#define __CLI_PARSE__ACTOR_H__

#include <stdlib.h> /// size_t

class e3dCamera;

namespace Underlight {
  class Sector;
};

namespace cli_parse {
  class Actor {
  public:
             Actor (void);
    virtual ~Actor (void) { };

  public:
    // Util
    virtual size_t MemSize (void) const = 0;

    // Selectors
    virtual float GetX     (void) const = 0;
    virtual float GetY     (void) const = 0;
    virtual float GetZ     (void) const = 0;
    virtual float GetAngle (void) const = 0;
    virtual int   GetRoom  (void) const = 0;

    virtual int   GetID    (void) const {
      return id;
    }

    virtual Underlight::Sector* GetSector (void) const {
      return sector;
    }

  protected:
    int                  id;
    Underlight::Sector*  sector;
    int                  room;
  };

  class Ornament : public Actor
  {
  public:
    Ornament ( int id,
               float x, float y, float z, float extent, float angle,
               int room, int bitmap, int frames, int views ) {
      this->id     = id;
      this->x      = x;
      this->y      = y;
      this->z      = z;
      this->extent = extent;
      this->angle  = angle;
      this->room   = room;
      this->bitmap = bitmap;
      this->frames = frames;
      this->views  = views;
    }

    ~Ornament (void) { };

    size_t MemSize (void) const
    {
      return sizeof (Ornament);
    }

    float GetX      (void) const { return x;      };
    float GetY      (void) const { return y;      };
    float GetZ      (void) const { return z;      };
    float GetExtent (void) const { return extent; };
    float GetAngle  (void) const { return angle;  };
    int   GetRoom   (void) const { return room;   };
    int   GetBitmap (void) const { return bitmap; };
    int   GetFrames (void) const { return frames; };
    int   GetViews  (void) const { return views;  };

  protected:
    float x;
    float y;
    float z;
    float extent; // NOTE: Can be negative, if hanging from the ceiling.
    float angle;
    int   bitmap;
    int   frames;
    int   views;
  };

  class EntryPoint : public Actor
  {
  public:
    EntryPoint (int id, float x, float y, float angle, int room, int type) {
      this->id     = id;
      this->x      = x;
      this->y      = y;
      this->angle  = angle;
      this->room   = room;
      this->type   = type;
    }

    ~EntryPoint (void) { };

    size_t MemSize (void) const
    {
      return sizeof (EntryPoint);
    }

    float GetX     (void) const { return x;    };
    float GetY     (void) const { return y;    };
    float GetZ     (void) const { return 0.0f; };
    float GetAngle (void) const { return angle;};
    int   GetRoom  (void) const { return room; };
    int   GetType  (void) const { return type; };

  protected:
    float x;
    float y;
    float angle;
    int   type;
  };
};

#endif /* __CLI_PARSE__ACTOR_H__ */
